package com.atguigu.gulimall.member.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 满超
 * @date 2020/06/22
 **/
@Configuration
public class WebConfig implements WebMvcConfigurer {

    //拦截器规则
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MemberIntercept()).addPathPatterns("/**");//拦截词拦截器所有请求
    }
}
